const app = getApp()

// pages/index/index.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    navList: [{
      "title": "歌手",
      "src": "/images/temp/c1.png"
    }, {
      "title": "排行",
      "src": "/images/temp/c2.png"
    }, {
      "title": "分类歌单",
      "src": "/images/temp/c3.png"
    }, {
      "title": "音乐电台",
      "src": "/images/temp/c4.png"
    }, {
      "title": "扑淘商城",
      "src": "/images/temp/c5.png"
    }, {
      "title": "数字专辑",
      "src": "/images/temp/c6.png"
    }, {
      "title": "数字藏品",
      "src": "/images/temp/c7.png"
    }, {
      "title": "精选听单",
      "src": "/images/temp/c8.png"
    }],
    productList: [{
      "id": 1,
      "name": "随心听",
      "src": "/images/temp/cate1.jpg",
      "price": 4099
    }, {
      "id": 2,
      "name": "深度催眠",
      "src": "/images/temp/cate2.jpg",
      "price": 4099
    }, {
      "id": 3,
      "name": "情歌",
      "src": "/images/temp/cate3.jpg",
      "price": 4099
    }, {
      "id": 4,
      "name": "情感治愈站",
      "src": "/images/temp/cate4.jpg",
      "price": 4099
    }, {
      "id": 5,
      "name": "影视原声",
      "src": "/images/temp/cate5.jpg",
      "price": 4099
    }, {
      "id": 6,
      "name": "跑步电台",
      "src": "/images/temp/cate6.jpg",
      "price": 4099
    }, {
      "id": 7,
      "name": "热门翻唱",
      "src": "/images/temp/cate7.jpg",
      "price": 4099
    }, {
      "id": 8,
      "name": "经典日漫",
      "src": "/images/temp/cate8.jpg",
      "price": 4099
    }]
  },
  getNavList: function () {
    this.setData({
      navList: this.data.navList
    })
  },
  getProductList: function () {
    this.setData({
      productList: this.data.productList
    })
  },


/**
 * 生命周期函数--监听页面加载
 */
onLoad: function (options) {
  this.getNavList();
  this.getProductList();
},

/**
 * 生命周期函数--监听页面初次渲染完成
 */
onReady: function () {

},

/**
 * 生命周期函数--监听页面显示
 */
onShow: function () {

},

/**
 * 生命周期函数--监听页面隐藏
 */
onHide: function () {

},

/**
 * 生命周期函数--监听页面卸载
 */
onUnload: function () {

},

/**
 * 页面相关事件处理函数--监听用户下拉动作
 */
onPullDownRefresh: function () {

},

/**
 * 页面上拉触底事件的处理函数
 */
onReachBottom: function () {

},

/**
 * 用户点击右上角分享
 */
onShareAppMessage: function () {

}
})